Skip to content

Close Connection to prevent gRPC leak error messages#3890

Closed
baeminbo wants to merge 1 commit into
googleapis:mainfrom
baeminbo:beam-grpc-leak
Closed

Close Connection to prevent gRPC leak error messages#3890
baeminbo wants to merge 1 commit into
googleapis:mainfrom
baeminbo:beam-grpc-leak

Conversation

@baeminbo

@baeminbo baeminbo commented Dec 12, 2022

Copy link
Copy Markdown

I believe this change can reduce the gRPC connection leak error messages that look scary but no impact on the Bigtable operations.

*~*~*~ Channel ManagedChannelImpl{logId=288, target=bigtableadmin.googleapis.com:443} was not shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.

Reader.close(): fixes #2658 where original fix #2782 was rolled back by #2871 and #2873. As we don’t use “session” here anymore, I believe we should close “connection” here.

AbstractCloudBigtableTableDoFn.tearDown(): If an exception happened in ProcessElement, FinishBundle is not executed. We should clean up resources in TearDown. You can see the similar code with BigQueryIO apache/beam#14949.


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2658

If you write sample code, please follow the samples format.

* Reader.close(): fixes googleapis#2658 where original fix googleapis#2782 was rolled back by googleapis#2871 and googleapis#2873. As we don’t use “session” here anymore, I believe we should close “connection” here.
* AbstractCloudBigtableTableDoFn.tearDown(): If an exception happened in ProcessElement, FinishBundle is not executed. We should clean up resources in TearDown. You can see the similar code with BigQueryIO apache/beam#14949.
@baeminbo baeminbo requested a review from a team December 12, 2022 03:32
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/java-bigtable-hbase API. labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable-hbase API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigtableSession is never closed by Reader causing "ManagedChannel allocation site" exceptions

2 participants